﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <meta charset="utf-8" />
    <script src="../0_System_file/js/jquery.min.js"></script>
    <script src="../0_System_file/js/jquery.easyui.min.js"></script>
    <script src="../0_System_file/js/validatebox.js"></script>
    <link href="../0_System_file/themes/default/easyui.css" rel="stylesheet" />
    <link href="../0_System_file/themes/icon.css" rel="stylesheet" />
    <link href="../0_System_file/themes/Site (1).css" rel="stylesheet" />
    <style type="text/css">
        #cc {
            width: auto;
            height: 400px;
            border: 1px solid blue;
        }
    </style>
    <script type="text/javascript">
        $(function(){
            $("#dg").datagrid({
                fitColumns: true,//真正的自动展开，适应网格宽度，防止水平滚动
                //toolbar: "#tb",
                pagination: true,//分页
                fit: true,//面板自适应父容器
                singleSelect: true,//只允许选择一行
                rownumbers: true,//显示一个行号列

                url: "/10_Json/datagrid_data1.json",
                method: "get",
                columns: [[
                      { field: "productid", title: "商铺ID", width: 100 },
                { field: "productname", title: "商铺名称", width: 100 },
                { field: "unitcost", title: "价格", width: 100 }
                ]]
            });
            //下拉框
            $('#cc').combo({
                required: true,
                editable: false
            });
            $('#sp').appendTo($('#cc').combo('panel'));
            $('#sp input').click(function () {
                var v = $(this).val();
                var s = $(this).next('span').text();
                $('#cc').combo('setValue', v).combo('setText', s).combo('hidePanel');
            })
            //编辑修改
            $("#btnUpdate").click(function(){
                var row = $("#dg").datagrid("getSelected");
                if (row != null) {
                    $("#dlg").dialog({ width: 400, height: 400 }).dialog("setTitle", "修改用户信息").dialog("open");
                    $("#frm1").attr("src", "01 Index.html");
                }
                else {
                    $.messager.alert("提示", "请选择需要编辑的行", "warning");
                }
            }
            )})
    </script>
</head>
<body>
    <div id="tb" style="padding:5px;height:auto">
        <fieldset style="border-color:cornflowerblue;">
            <legend>查询</legend>
            <div>
                消费日期&nbsp;&nbsp;：<input class="easyui-datetimebox" name="birthday"
                                        data-options="required:true,showSeconds:false" value="3/4/2010 2:3" style="width:150px">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至：<input class="easyui-datetimebox" name="birthday"
                                                                                                                                     data-options="required:true,showSeconds:false" value="3/4/2010 2:3" style="width:150px">
                <br />
                卡号/手机：<input class="easyui-validatebox" type="text" data-options="validType:'mobile'" />
                按会员等级：
                <!--<input id="cc" class="easyui-combobox" style="width:150px" name="dept"
                       data-options="valueField:'id',textField:'text',url:'get_data.php'" />-->

                <select id="cc" style="width:100px;height:20px"></select>

                <div id="sp">

                    <div style="padding:10px">

                        <input type="radio" name="lang" value="01" /><span>普通会员</span><br />
                        <input type="radio" name="lang" value="02" /><span>银卡会员</span><br />
                        <input type="radio" name="lang" value="03" /><span>白卡会员</span><br />
                        <input type="radio" name="lang" value="04" /><span>金卡会员</span><br />
                    </div>
                </div>

                消费金额：  <input id="ss" class="easyui-numberspinner" style="width:80px;"
                              required="required" data-options="min:10,max:100,editable:false">
                <a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>  <br />
                &nbsp;订&nbsp;&nbsp;单&nbsp;&nbsp;号：<input id="txtU_Telephone" type="text" />
            </div>
        </fieldset>
        <div id="cc"><table id="dg"></table> </div>
    </div>
</body>
</html>
